package com.nnfe.fyd.feature.inquiryPrice;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.nnfe.fyd.R;
import com.nnfe.fyd.base.MyBaseAdapter;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * ----------------------------------
 * Created by xyd on 2017/3/21.
 * <p/>
 * 描  述：
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class ListViewAdapter extends MyBaseAdapter {

    public ListViewAdapter(Context mContext) {
        super(mContext);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder = null;
        if (convertView == null) {
            convertView = View.inflate(mContext, R.layout.item_inquiry, null);
            viewHolder = new ViewHolder(convertView);
            convertView.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) convertView.getTag();
        }

        viewHolder.tvItemContent.setText((String) data.get(position));


        return convertView;
    }


    static class ViewHolder {
        @Bind(R.id.tv_item_content)
        TextView tvItemContent;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
